package com.tuozixuan;

import static com.tuozixuan.GitDemoConstants.LOCAL_DIR;

import java.io.File;
import java.util.List;

import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.diff.DiffEntry;

public class GitDiffDemo {

	public static void main(String[] args) throws Exception {

		Git git = Git.open(new File(LOCAL_DIR));
		List<DiffEntry> diffEntryList = git.diff().call();
		
		System.out.println("==========start===========");
		diffEntryList.stream().forEach(diffEntry -> {
			System.out.println(diffEntry);
		});
		System.out.println("==========end===========");
	}

}
